<!-- 关联收款单据详情 -->
<template>
	<view class="">
		<!-- <u-sticky offset-top="0">
			<common-search
				class="search"
				v-model="queryParam.htmc" 
				:screenShow="screenShow" 
				:isScreen="false"
				@screenclick="screenclick"
				@searchMsg="searchMsg"
				placeholder="请输入项目名称"
			></common-search>
		</u-sticky> -->
		<view class="page" :style="!isData?'display:flex;width: 100vw;height:100vh;align-items:center;justify-content: center;':''">
			<template v-if="isData">
				<view class="list" v-for="(item,index) in dataList" :key="index">
					<view class="">
						<view class="option">
							<view class="lf">收款单编号</view>
							<view class="rl">{{ item.billNo }}</view>
						</view>
						<view class="option">
							<view class="lf">汇款单位</view>
							<view class="rl">{{ item.enterpriseName_dictText }}</view>
						</view>
						<view class="option">
							<view class="lf">汇款日期</view>
							<view class="rl">{{ item.remittanceDate }}</view>
						</view>
						<view class="option">
							<view class="lf">收款单位</view>
							<view class="rl">{{ item.payeeUnit_dictText }}</view>
						</view>
						<view class="option">
							<view class="lf">收款账户</view>
							<view class="rl">{{ item.payeeAccountNo }}</view>
						</view>
						<view class="option">
							<view class="lf">收款金额(元)</view>
							<view class="rl">{{ item.remittanceAmount }}</view>
						</view>
						<view class="option">
							<view class="lf">扣款金额(元)</view>
							<view class="rl">{{ item.deductMoney }}</view>
						</view>
					</view>
				</view>
				<!-- 加载更多显示 -->
				<!-- <view class=""><u-loadmore :status="statusLoadmore" /></view> -->
			</template>
			<view v-else>
				<u-empty
					mode="data"
					icon="/static/empty/data.png"
				>
				</u-empty>
			</view>
		</view>
		<u-toast ref="uToast"></u-toast>
	</view>
</template>
<script>
	import { erpCompanyFilesList } from '@/api/index.js';
	import CommonSearch from '../../components/CommonSearch.vue'
	import http from '@/utils/request/index.js'
	export default {
		components: {
			CommonSearch
		},
		data() {
			return {
				id: '', // 选中的id
				page: {
					pageNo: 1,
					pageSize: 10,
				},
				dataList: [] ,// 列表
				isData: true, // 判断是否有数据  true 代表有 false 代表无
				statusLoadmore: 'loadmore', // 通过status设置组件的状态，加载前值为loadmore，加载中为loading，没有数据为nomore
				screenShow: false, // 筛选弹窗
				// 传的参数
				queryParam: {
					htmc: ''
				},
				
				objectField: '', // 点击确认需要修改的字段
			}
		},
		onLoad(options) {
			this.id = options.id || ''
			this.geterpOmcTeamManagerList() // 获取列表
		},
		methods: {
			// 获取列表
			geterpOmcTeamManagerList () {
				this.statusLoadmore = 'loading' // 加载中
				var params = {
					id: this.id
					
				}
				// if (this.queryParam.htmc) {
				// 	params.htmc = '*' + this.queryParam.htmc + '*'
				// }
				http.get('/api/erp/progress/erpProgressPaymentNodeDt/queryListByMainId', params).then(res => {
					if (res.success) {
						 // 判断加载是否有数据
						 if (res.result&&res.result.length) {
						 	this.isData = true
						 } else {
						 	this.isData = false
						 }
						this.statusLoadmore = 'nomore'
						this.dataList = res.result
					}
				})
			},
			
			// 点击筛选
			screenclick () {
				this.screenShow = !this.screenShow
			},
			// 输入内容
			searchMsg () {
				this.page.pageNo = 1 // 页数归1
				this.dataList = [] // 清空列表
				this.geterpOmcTeamManagerList() // 获取列表
			}
		}
	}
</script>
<style lang="scss" scoped>
.page {
	padding: 0 20rpx 20rpx 20rpx;
	.list{
		border-radius: 10rpx;
		box-shadow: 0px 4px 20px 0px rgba(0,0,0,0.1);
		padding: 12rpx 20rpx 20rpx 20rpx;
		background: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-top: 20rpx;
	}
}

// 按钮
.btn{
	position: fixed;
	bottom: 20rpx;
	width: 95%;
}
</style>

